package com.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.Dao.BookShopDao;

@Service
public class BookShopServiceImpl implements BookShopService{
	
	@Autowired
	private BookShopDao bookShopDaoImpl;

	@Override
	public void saleBook(String username, String isbn) {
		System.out.println(bookShopDaoImpl);
		Double price=bookShopDaoImpl.getPriceByIsbn(isbn);
		bookShopDaoImpl.updateStockByisbn(isbn);
		bookShopDaoImpl.updateAccountByPrice(username, price);
	}

}
